{% if pageCount > 1 %}
<div>
  <center>
    <ul class="pagination">
      {% if first is defined and current != first %}
      <li>
        <a href="{{ path(route, query|merge({(pageParameterName): first})) }}">第1页</a>
      </li>
      {% endif %}

      {% if previous is defined %}
      <li>
        <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}">上一页</a>
      </li>
      {% endif %}

      {% for page in pagesInRange %}
      {% if page != current %}
      <li>
        <a href="{{ path(route, query|merge({(pageParameterName): page})) }}">{{ page }}</a>
      </li>
      {% else %}
      <li> <a href="{{ path(route, query|merge({(pageParameterName): page})) }}">
          <strong>{{ page }}</strong></a>
      </li>
      {% endif %}

      {% endfor %}

      {% if next is defined %}
      <li>
        <a href="{{ path(route, query|merge({(pageParameterName): next})) }}">下一页</a>
      </li>
      {% endif %}

      {% if last is defined and current != last %}
      <li>
        <a href="{{ path(route, query|merge({(pageParameterName): last})) }}">最后一页</a>
      </li>
      {% endif %}
    </ul>
  </center>
</div>
{% endif %}
